<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/resource/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/resource/css/mylay.css">
</head>
<style>
    .layui-form-pane .layui-form-label{
        width: 200px;
    }
    .layui-form-pane .layui-input-block{
        margin-left:200px;
    }
</style>
<body>
    <div style="padding: 20px; background-color: #F2F2F2;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <!-- <p style="color:red;">请填写账号后再上传，否则将导致失败</p>
                        <p style="color:red;">请在二维码图片显示后再点击确定提交</p>
                        <br /> -->
                        <form class="layui-form layui-form-pane" action="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">发行者</label>
                                <div class="layui-input-inline">
                                    <select name="uid" lay-verify="required" lay-search="">
                                        {foreach $users as $key=>$value }
                                        <option value="{$value.id}" {if $value['id'] == $data['uid']}selected='selected'{/if}>{$value.username}</option>
                                        {/foreach}
                                    </select>
                                </div>
                                <div class="layui-form-mid layui-word-aux"></div>
                            </div>
                           
                            <div class="layui-form-item">
                                <label class="layui-form-label">NFT文件</label>
                                <div class="layui-input-inline">
                                    <div class="layui-upload">
                                        <button type="button" class="layui-btn" id="file">
                                            <i class="layui-icon">&#xe67c;</i>上传
                                        </button>
                                        <div class="layui-upload-list">
                                            <img class="layui-upload-img" id="file_image" style="width:150px;" src="{$data['file']}">
                                            <p id="file_image_text"></p>
                                        </div>
                                    </div>
                                    <input type="hidden" name="file" id="file_input" value="{$data['file']}" placeholder="" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">选择图片后自动上传</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">NFT名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" autocomplete="off" placeholder="请输入NFT名称" class="layui-input" value="{$data['name']}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">类型</label>
                                <div class="layui-input-inline">
                                    <select name="credit_type" lay-verify="required" lay-search="">
                                        {foreach $creditType as $key=>$value }
                                        <option value="{$value['id']}" {if $value['id'] == $data['credit_type']}selected='selected'{/if}>{$value['name']}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                           
                            

                            <div class="layui-form-item">
                                <label class="layui-form-label">特性，请用英文逗号分隔</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="characteristic" value="{$data['characteristic']}" autocomplete="off" placeholder="请输入特性，请用英文逗号分隔" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">描述</label>
                                <div class="layui-input-block">
                                    <textarea name="content" placeholder="描述" class="layui-textarea">{$data['content']}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item" style="margin-top: 40px;text-align: center;">
                                <input type="hidden" name="id" value="{$data.id}" autocomplete="off" class="layui-input">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="nft_edit">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

<script src="/resource/layuiadmin/layui/layui.js"></script>
<script src="/resource/js/manage/init_date.js"></script>
<script src="/resource/js/manage/nft.js"></script>
</body>
</html>